function agreeCancel(diarycontent){
    layer.confirm('确定通过注销请求吗?',
        {icon: 3, title: '系统提示'},
        function (index) {
            var id = diarycontent;
            $.ajax({
                type : 'POST',
                url : '/agreeCancel',
                data : {id:id},
                success:function (data) {

                    if (data == "OK"){
                        layer.msg('操作成功', {
                            icon: 1,
                            shadeClose: true,
                            skin: 'layui-layer-molv',
                            time: 2000 //2秒关闭（如果不配置，默认是3秒）
                        }, function(){
                            window.location.href = window.location.href;
                        });
                    }else {
                        layer.open({
                            title: '提示信息',
                            anim: 0,
                            resize:false,//是否可以拉伸  默认true
                            icon: 2,
                            shadeClose: true,
                            skin: 'layui-layer-molv',
                            content: data
                        });
                    }
                },
                error: function (e) {
                    console.log(e)
                }
            });
            layer.close(index);
        });
}
function refuseCancel(diarycontent){
    layer.confirm('确定拒绝注销请求吗?',
        {icon: 3, title: '系统提示'},
        function (index) {
            var id = diarycontent;
            $.ajax({
                type : 'POST',
                url : '/refuseCancel',
                data : {id:id},
                success:function (data) {

                    if (data == "OK"){
                        layer.msg('操作成功', {
                            icon: 1,
                            shadeClose: true,
                            skin: 'layui-layer-molv',
                            time: 2000 //2秒关闭（如果不配置，默认是3秒）
                        }, function(){
                            window.location.href = window.location.href;
                        });
                    }else {
                        layer.open({
                            title: '提示信息',
                            anim: 0,
                            resize:false,//是否可以拉伸  默认true
                            icon: 2,
                            shadeClose: true,
                            skin: 'layui-layer-molv',
                            content: data
                        });
                    }
                },
                error: function (e) {
                    console.log(e)
                }
            });
            layer.close(index);
        });
}
